import axios from "@/utils/request";

export function addTeacher(params){
    return axios({
        method:"post",
        url:"/teacher",
        data:params
    })
}

export function deleteTeacher(params){
    return axios({
        method:"delete",
        url:"/teacher",
        data:params
    })
}

export function updateTeacher(params){
    return axios({
        method:"put",
        url:"/teacher",
        data:params
    })
}

export function selectTeacher(params){
    return axios({
        method:"get",
        url:"/teacher",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            search:params.search,
        }
    })
}

export function loginTeacher(params){
    return axios({
        method:"post",
        url:"/teacher/login",
        data: params
    })
}

export function logoutTeacher(params){
    return axios({
        method:"post",
        url:"/teacher/logout",
        data: params
    })
}

export function teacherCount(params){
    return axios({
        method:"get",
        url:"/teacher/teacherCount",
        params: params
    })
}

export function exportData(params){
    return axios({
        method:"get",
        url:"/teacher/exportData",
        params: {
            search:params.search
        }
    })
}

export function selectAllTeacher(params){
    return axios({
        method:"get",
        url:"/teacher/selectAll",
        data:params
    })
}

export function importData(params){
    return axios({
        method:"post",
        url:"/teacher/importData",
        data: params
    })
}

export function batchResetPsw(params){
    return axios({
        method:"post",
        url:"/teacher/batchResetPsw",
        data: params
    })
}